package xj.model.uml;

import static xj.model.uml.UMLModelConstants.ATTR_SUBMACHINE_NAME;

public class SubmachineState extends State {

  public SubmachineState() {
    super(StateType.Submachine_State);
  }

  public SubmachineState(String name, String smname) {
    super(name, StateType.Submachine_State);
    setSubmachineName(smname);
  }

  public String getSubmachineName() {
    return submachineName;
  }

  public void setSubmachineName(String name) {
    submachineName = name;
    setAttribute(ATTR_SUBMACHINE_NAME, name);
  }

  @Override
  public Object clone() throws CloneNotSupportedException {
    SubmachineState sm = (SubmachineState) super.clone();
    sm.setSubmachineName(submachineName);
    return sm;
  }

  protected String submachineName;

}
